package com.hh.common.request;

import com.hh.common.constants.RegularConstants;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class EditSocializeInfoRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotBlank(message = "图像不能为空")
    private String photo;

    @NotBlank(message = "名字不能为空")
    @Length(max = 16, message = "文章标题最多16个字符")
    private String fullName;

    @NotBlank(message = "手机号不能为空")
    @Pattern(regexp = RegularConstants.PHONE, message = "手机号码格式错误")
    private String phone;

    @Email(message = "请填写正确的邮箱")
    private String mailbox;

}
